package com.wanbangee.marksystem.service.score;

import java.util.List;
import java.util.Map;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.wanbangee.marksystem.entities.MExamMarker;

@FeignClient(value = "KAOJINBANG-EXAMINATION-SETTING-PROVIDER")
public interface SettingScoreService {

	/**
	 * 质量监控的图标信息查询
	 * @param examId
	 * @param examSubId
	 * @param topicNo
	 * @return
	 */
	@RequestMapping(value = "quality/setting/selectQualityCharInfo/{examId}/{examSubId}/{topicNo}", method = RequestMethod.GET)
	public List<MExamMarker> selectQualityCharInfo(@PathVariable("examId")Integer examId,@PathVariable("examSubId")Integer examSubId,@PathVariable("topicNo")Integer topicNo) ;

	/**
	 * 判断是否为学科负责人
	 * @param examId
	 * @param examSubId
	 * @param teaId
	 * @return
	 */
	@RequestMapping(value = "quality/setting/selectIsPrincipalTea/{examId}/{examSubId}/{teaId}", method = RequestMethod.GET)
	public Map selectIsPrincipalTea(@PathVariable("examId")Integer examId,@PathVariable("examSubId")Integer examSubId,@PathVariable("teaId")Integer teaId) ;
	
	/**
	 * 质量监控中，查询阅卷题目的详细信息
	 * @param markerId
	 * @return
	 */
	@RequestMapping(value = "quality/setting/selectExamTeaInfo/{markerId}", method = RequestMethod.GET)
	public MExamMarker selectExamTeaInfo(@PathVariable("markerId")Integer markerId) ;

	@GetMapping("quality/setting/selectMExamMarkerList/{examId}/{examSubId}/{topicNo}")
	public List<MExamMarker> selectMExamMarkerList(@PathVariable("examId")Integer examId,@PathVariable("examSubId")Integer examSubId,@PathVariable("topicNo")Integer topicNo) ;

	/**
	 * 用于进度监控的列表显示界面
	 * @param schId
	 * @param teaId
	 * @return
	 */
	@GetMapping("progress/setting/selectProgressList/{examId}/{examSubId}")
	public Map selectProgressList(@PathVariable("examId")Integer examId,@PathVariable("examSubId")Integer examSubId) ;

	/**
	 * 根据当前学校 id 查询还未过期的考试 id
	 * @param schId
	 * @param date
	 * @return
	 */
	@GetMapping("progress/setting/selectExamId/{schId}/{date}")
	public Map selectExamId(@PathVariable("schId")Integer schId,@PathVariable("date")String date) ;
	
	/**
	 * 根据考试 id 查询考试科目 id
	 * @param examId
	 * @return
	 */
	
	@GetMapping("progress/setting/selectMSubjectByExamId/{examId}")
	public Map selectMSubjectByExamId(@PathVariable("examId")Integer examId);
	
	@PostMapping("progress/setting/insertMExamMarker")
	public Map insertMExamMarker(@RequestBody MExamMarker mExamMarker) ;
	
	/**
	 * 更新阅卷组表的数量
	 * @param oldMarkerId
	 * @param topicCount
	 * @param topicNo
	 * @param newMarkerId
	 * @return
	 */
	@PostMapping("progress/setting/updateMExamMarkerCount")
	public Integer updateMExamMarkerCount(@RequestParam("oldMarkerId")Integer oldMarkerId,@RequestParam("topicCount")Integer topicCount,@RequestParam("newMarkerId")Integer newMarkerId ) ;
	
	/**
	 * 分解阅卷任务的候选人列表
	 * @return
	 */
	@GetMapping("progress/setting/selectExamTeaCandidate/{examId}/{examSubId}/{topicNo}")
	public Map selectExamTeaCandidate(@PathVariable("examId")Integer examId,@PathVariable("examSubId")Integer examSubId,@PathVariable("topicNo")Integer topicNo) ;
	
	/**
	 * 用于分解阅卷任务哦，获取信息
	 * @param markerId
	 * @return
	 */
	@GetMapping("progress/setting/selectMExamMarkerByMarkerIdOnResolver/{markerId}")
	public MExamMarker selectMExamMarkerByMarkerIdOnResolver(@PathVariable("markerId")Integer markerId) ;
	
	/**
	 * 通过 teaId 和 schId 获取 examId 和 examSubId 来用于重评列表
	 * @param teaId
	 * @param schId
	 * @return
	 */
	@GetMapping("progress/setting/selectMExamMarkersRepeatList/{teaId}/{schId}")
	public List<MExamMarker> selectMExamMarkersRepeatList(@PathVariable("teaId")Integer teaId,@PathVariable("schId")Integer schId);
}

